<?php
/**
 * -----------------------------------------------------
 *
 * models setup_model
 *
 * @package     models
 * @subpackage  
 * @category    setup_model
 * @author      DongChao
 * @since       2015-07-04 version 1.0       
 * -----------------------------------------------------    
 */
class setup_model extends CI_Model
{	
	public function __construct()
	{
		parent::__construct();
		$this->load->database();
	}

	/**
	 * 查询数据
	 */
	public function getAll(){
		$res=$this->db->get('xc_setup');
		return $res->row_array();
	}

	/**
	 * 更新数据
	 */
	public function edit($data,$id){
		//修改数据
		$res=$this->db->update('xc_setup',$data,array('id'=>$id));
		if($res){
			return true;
		}else{
			return false;
		}
	}
}